<?php
$this->Javascript->link(array('jquery-1.6.4.min.js','jquery.validate.min.js'), false);

?>
<script type="text/javascript">


$(document).ready(function(){

	/**
	 * Function validate
	 * 
	 * Checks if the form meets the required rules, and if the requirements are not met shows the errors onscreen.
	 * triggers onsubmit, onchange
	 */
	$('#UserRegisterForm').validate({

		rules:{
			'data[User][name]':"required",
			'data[User][email]':"required",
			'data[User][phone]': "required"
			
		}
	});
});
</script>
<div id="reg">
<h2>Register</h2>
<div id="regpos">
<?php
    echo $this->Form->create('User');
    echo $this->Form->input('name');
    echo $this->Form->input('email');
	echo $this->Form->input('phone');
    echo $this->Form->end('Register');
?>
</div>
<p><?php echo $this->Html->image('postitlogin.png', array('alt' => 'register instructions written on a post it', 'class' => 'registerpostit'))?></p>
<br/>
</div>